Skip to main content

TigerGraph

Summary

This document covers the information to gather from TigerGraph in order to configure a Qarbine data service. The data service will use the Qarbine TigerGraph driver. You can define multiple data services that access the same TigerGraph endpoint though with varying credentials. Once a data service is defined, you can manage which Qarbine principals have access to it and its associated TigerGraph data. A Qarbine administrator has visibility to all data services.

Overview

TigerGraph is a popular graph database. Qarbine supports direct, native TigerGraph GSQL queries and API access. Native interactions are the only real way to access the full power of TigerGraph. More information of the offering can be found at https://tigergraph.com/.

TigerGraph Configuration Information

Identifying the Domain

Navigate to your workgroup

  

Click on the workspace name to the right to see its details.

  

Click on the highlighted value to obtain the host name.

  

The host value will be prefixed with “https://” to form the Qarbine data service’s server template value.

Confirm Network Connectivity

Confirm network connectivity by clicking the tab shown below.

  

Make sure the Qarbine server has connectivity to the TigerGraph server.

Authentication Via a Secret Value

Navigate to your workspace.

Click the “Connect /” button and choose the highlighted option shown.

  

Expand the Management menu.

  

Choose “Users”.

  

In the line shown below

  

enter an alias name.

  

Click

  

A secret value will be generated.

  

Click the copy image to place the secret into the clipboard.

  

You must copy the value now as this is the ONLY time it will ever be fully visible. It is used as one of the Qarbine data service parameters.

Qarbine Configuration

Compute Node Preparation

Determine which compute node service endpoint you want to run this data access from. That URL will go into the Data Service’s Compute URL field. Its form is “https://domain:port/dispatch”. A sample is shown below.

  

The port number corresponds to a named service endpoint configured on the given target host. For example, the primary compute node usually is set to have a ‘main’ service. That service’s configuration is defined in the ˜./qarbine.service/config/service.main.json file. Inside that file the following driver entry is required

"drivers" :[
. . .
"./driver/tigerGraphDriver.js"
]

The relevant configuration file name for non primary (main) Qarbine compute nodes is service.NAME.json. Remember to have well formed JSON syntax or a startup error is likely to occur. If you end up adding that entry then restart the service via the general command line syntax

pm2 restart <service>

For example,

pm2 restart main

or simply

pm2 restart all

Data Service Definition

Open the Administration Tool.

Navigate to the Data Services tab.

  

A data service defines on what compute node a query will run by default along with the means to reach to target data. The latter includes which native driver to use along with settings corresponding to that driver. Multiple Data Sources can reference a single Data Service. The details of any one Data Service are thus maintained in one spot and not spread out all over the place in each Data Source. The latter is a maintenance and support nightmare.

To begin adding a data service click

  

Enter a name and optionally a description.

Set the Compute URL field based on the identified compute node above. Its form is “https://domain:port/dispatch”. A sample is shown below.

  

On the right hand side enter a data service name and description. Also choose the “TigerGraph” driver.

  

For the server template enter the TigerGraph domain name.

  

For the server options enter

secret= "THE_SECRET",

There is a comma between the multiple key\value pairs. The secret value is required.

Optionally include these options:

tokenLifespanInSeconds = ####,
qsqlTimeoutMs=###,
responseLimit=###,
syntaxVersion=#

The tokenLifespanInSeconds is optional. The TigerGraph default lifetime for a token is 7 days.

The qsqlTimeoutMs value corresponds to the GSQL-TIMEOUT header value. For details see

The responseLimit value corresponds to the RESPONSE-LIMIT header value. For details see

If specified, the numeric syntaxVersion (1 or 2) is used for dynamic select queries within

INTERPRET QUERY () FOR GRAPH ${graphName} syntax v<Version>

See this link for more details
https://docs.tigergraph.com/gsql-ref/4.1/querying/syntax-versions

You can reference environment variables using the syntax %NAME%. Any strings should be quoted and the key\value pairs separated by commas.

Optionally set the graph context by entering its name in the generic ‘Database’ field.

  

Test your settings by clicking on the toolbar image highlighted below.

  

The result should be the TigerGraph version and other information.

  

Save the Data Service by clicking on the image highlighted below.

  

The data service will be known at the next log on time. Next, see the TigerGraph query interaction and any tutorial for information on interacting with TigerGraph from Qarbine.

Loading Sample Data

TigerGraph provides options to load various sample data sets. Qarbine tutorials may reference some of these graphs.